package com.xkcoding.helloworld.strategy;

import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public class DiscountBServiceImpl implements DiscountService {

    private BigDecimal discountRate = new BigDecimal("0.75");

    @Override
    public String getDiscountResult(BigDecimal price) {
        //进行折扣相关业务处理
        return "执行折扣B优惠后金额："+price.multiply(discountRate);
    }
}
